<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>main.c</title>
<link href="tabs.css" rel="stylesheet" type="text/css" />
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="alias.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="alias.js"></script>

<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>


<script type="text/javascript">
  jQuery(document).ready(function () {
    if(gref){ // Number all _img and _table classes
      gref();
    }
  });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->

<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">nRF51822 BLE SDK
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('group__ble__sdk__app__proximity__main.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#define-members">Defines</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">main.c</div>  </div>
<div class="ingroups"><a class="el" href="group__ble__sdk__app__proximity.html">Proximity Application</a></div></div>
<div class="contents">

<p>Proximity Sample Application main file.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="define-members"></a>
Defines</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gabab92753edef69fc4821618765ae1541">ALERT_LEVEL_MILD_LED_PIN_NO</a>&#160;&#160;&#160;NRF6310_LED_2</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga40c245aa7d948f577a38078b5fc7fa84">ALERT_LEVEL_HIGH_LED_PIN_NO</a>&#160;&#160;&#160;NRF6310_LED_3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga70b0e83bb09a339ead4165071e8121ae">ADV_INTERVAL_SLOW_LED_PIN_NO</a>&#160;&#160;&#160;NRF6310_LED_4</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga5f5a2c9450ebc584b4fe743c6b1a280b">DEVICE_NAME</a>&#160;&#160;&#160;&quot;PRX_APPV0.1&quot;</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga5af0eca94bfe9c08e0f0afe7d1e135c3">APP_ADV_INTERVAL_FAST</a>&#160;&#160;&#160;0x0028</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab8e8444f5d93426322d8cc2778d5fcf0">APP_ADV_INTERVAL_SLOW</a>&#160;&#160;&#160;0x0C80</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaf58371bad8e1be8e2323df60379ed2df">APP_ADV_TIMEOUT_IN_SECONDS</a>&#160;&#160;&#160;180</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab4de9cc4edfce504a560aa7bcb2c7cd3">ADV_INTERVAL_FAST_PERIOD</a>&#160;&#160;&#160;30000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaf28f0232a3fdc0eb03b94eb34b25cde8">BATTERY_LEVEL_MEAS_INTERVAL</a>&#160;&#160;&#160;2000</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga59eb06cba38be11278ebd2829e95bc26">MIN_BATTERY_LEVEL</a>&#160;&#160;&#160;81</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga16896fb7a69ca90a4a4e341d5a888002">MAX_BATTERY_LEVEL</a>&#160;&#160;&#160;100</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga69eef02165834e4dabc5757b82dddbf1">BATTERY_LEVEL_INCREMENT</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga95196d5d0f40cf195a6001955d6d98cf">MIN_CONN_INTERVAL</a>&#160;&#160;&#160;((1 * 800) / 2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga7d868ed8adb7d475b463fd8855907a18">MAX_CONN_INTERVAL</a>&#160;&#160;&#160;(1 * 800)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga0c921a874ac37870fc1516ce66cd228a">SLAVE_LATENCY</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga799412c2b531ca347e13611e6e7523b9">CONN_SUP_TIMEOUT</a>&#160;&#160;&#160;(4 * 100)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga7204f7a367e8f1ac53ef62c4ad220efc">FIRST_CONN_PARAMS_UPDATE_DELAY</a>&#160;&#160;&#160;(20 * 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gadf85796ef07632ed27e0bce9509d9245">NEXT_CONN_PARAMS_UPDATE_DELAY</a>&#160;&#160;&#160;(5 * 1000)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga34db81384bfbef23dedbef9bc6dfe46c">MAX_CONN_PARAMS_UPDATE_COUNT</a>&#160;&#160;&#160;3</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga7c1fffb0f865552108560d4c63b32db1">SEC_PARAM_TIMEOUT</a>&#160;&#160;&#160;60</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gacbf03a82593c273743a5a80a1119b851">SEC_PARAM_BOND</a>&#160;&#160;&#160;1</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab6831ebe113f8afe970326b7742b5947">SEC_PARAM_MITM</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga42df85b3a4083cdc614d9111d580d98f">SEC_PARAM_IO_CAPABILITIES</a>&#160;&#160;&#160;BLE_GAP_IO_CAPS_NONE</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaee13a0d0077f423fa0edd74e17fb6b88">SEC_PARAM_OOB</a>&#160;&#160;&#160;0</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga6b7b2e2f67fbf790f55b46f8f5e24ad5">SEC_PARAM_MIN_KEY_SIZE</a>&#160;&#160;&#160;7</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaf2cd1595de153ea1d6d843619a1a7707">SEC_PARAM_MAX_KEY_SIZE</a>&#160;&#160;&#160;16</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga6c90d462c21d0b30c272f5cba8963836">INITIAL_LLS_ALERT_LEVEL</a>&#160;&#160;&#160;BLE_CHAR_ALERT_LEVEL_NO_ALERT</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga5273cd1f329a5864a9c2bd28f65e9d54">TX_POWER_LEVEL</a>&#160;&#160;&#160;(-8)</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga943e77d327737757ea2bdf929e75349d">on_ias_evt</a> (<a class="el" href="group__ble__sdk__srv__ias.html#ga8a63bc7ea5b311d297838a4095271665">ble_ias_t</a> *p_ias, <a class="el" href="structble__ias__evt__t.html">ble_ias_evt_t</a> *p_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Immediate Alert event handler.  <a href="#ga943e77d327737757ea2bdf929e75349d"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga038703ec77748ff3b1b0c88f21579c5c">on_lls_evt</a> (<a class="el" href="group__ble__sdk__srv__lls.html#gae3a4320ff2f496c898601a41a9832a07">ble_lls_t</a> *p_lls, <a class="el" href="structble__lls__evt__t.html">ble_lls_evt_t</a> *p_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Link Loss event handler.  <a href="#ga038703ec77748ff3b1b0c88f21579c5c"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga236a1a602913d6780d797d929507873e"></a><!-- doxytag: member="ble_sdk_app_proximity_main::advertising_start" ref="ga236a1a602913d6780d797d929507873e" args="(bool fast_advertising)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga236a1a602913d6780d797d929507873e">advertising_start</a> (bool fast_advertising)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Start advertising. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gadec561788a76b8a63ad9663625a25d78">assert_nrf_callback</a> (uint16_t line_num, const uint8_t *file_name)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Assert macro callback function.  <a href="#gadec561788a76b8a63ad9663625a25d78"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga54ab546c90d69e5fc9cfee653024ea53">service_error_handler</a> (uint32_t nrf_error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Service error handler.  <a href="#ga54ab546c90d69e5fc9cfee653024ea53"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaf58c137ee11618425f8f0fa165834428">adv_interval_change_timeout_handler</a> (app_timer_id_t timer_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Advertising Interval Change timer timeout handler.  <a href="#gaf58c137ee11618425f8f0fa165834428"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab155022684d4acfd98218c3799822e74"></a><!-- doxytag: member="ble_sdk_app_proximity_main::battery_level_update" ref="gab155022684d4acfd98218c3799822e74" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab155022684d4acfd98218c3799822e74">battery_level_update</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Perform battery measurement, and update Battery Level characteristic in Battery Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga7e5b3d2cf024dde83b8c536b22a1c155">battery_level_meas_timeout_handler</a> (app_timer_id_t timer_id)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Battery measurement timer timeout handler.  <a href="#ga7e5b3d2cf024dde83b8c536b22a1c155"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga0892e076b365fc49b55bd0f90ab09222">leds_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">LEDs initialization.  <a href="#ga0892e076b365fc49b55bd0f90ab09222"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga265c25c068555fbfae4ab4f391060040"></a><!-- doxytag: member="ble_sdk_app_proximity_main::buttons_init" ref="ga265c25c068555fbfae4ab4f391060040" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga265c25c068555fbfae4ab4f391060040">buttons_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the buttons used by this application. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static __INLINE uint32_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga8014b2b4745214caa69c5fddd0401388">gpio_pin_read</a> (uint32_t pin_number)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Read the state of the input pin.  <a href="#ga8014b2b4745214caa69c5fddd0401388"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga09658aaa0774820d8f25249d551bc283">timers_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Timer initialization.  <a href="#ga09658aaa0774820d8f25249d551bc283"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga1004973353f351806e42896c491a5ab2">gap_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">GAP initialization.  <a href="#ga1004973353f351806e42896c491a5ab2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga935c9624de0709fe228dbefa4b54de48">advertising_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Advertising functionality initialization.  <a href="#ga935c9624de0709fe228dbefa4b54de48"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gab793003188ea0cfe80805f209cfe18f9"></a><!-- doxytag: member="ble_sdk_app_proximity_main::tps_init" ref="gab793003188ea0cfe80805f209cfe18f9" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab793003188ea0cfe80805f209cfe18f9">tps_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Tx Power Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6e6c548f4f38853a656d7a03a63a4e4d"></a><!-- doxytag: member="ble_sdk_app_proximity_main::ias_init" ref="ga6e6c548f4f38853a656d7a03a63a4e4d" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga6e6c548f4f38853a656d7a03a63a4e4d">ias_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Immediate Alert Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6e9243342e5712bd6364de76dc42bfdc"></a><!-- doxytag: member="ble_sdk_app_proximity_main::lls_init" ref="ga6e9243342e5712bd6364de76dc42bfdc" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga6e9243342e5712bd6364de76dc42bfdc">lls_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Link Loss Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga46507354f43dd16b32281f032e29d9c5"></a><!-- doxytag: member="ble_sdk_app_proximity_main::bas_init" ref="ga46507354f43dd16b32281f032e29d9c5" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga46507354f43dd16b32281f032e29d9c5">bas_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize Battery Service. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga5b27b40e18af00d43b92f57eaed0e9b2"></a><!-- doxytag: member="ble_sdk_app_proximity_main::services_init" ref="ga5b27b40e18af00d43b92f57eaed0e9b2" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga5b27b40e18af00d43b92f57eaed0e9b2">services_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize services that will be used by the application. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga6f75e3fe8d4ed6400f9429987dee0f3e"></a><!-- doxytag: member="ble_sdk_app_proximity_main::sensor_sim_init" ref="ga6f75e3fe8d4ed6400f9429987dee0f3e" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga6f75e3fe8d4ed6400f9429987dee0f3e">sensor_sim_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the battery sensor simulator. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga9f11118fb9ce22ad1afe20af6f89b131"></a><!-- doxytag: member="ble_sdk_app_proximity_main::sec_params_init" ref="ga9f11118fb9ce22ad1afe20af6f89b131" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga9f11118fb9ce22ad1afe20af6f89b131">sec_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize security parameters. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga4538ed130db3bf7fc68b76a4d9e032fa">conn_params_error_handler</a> (uint32_t nrf_error)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Connection Parameters module error handler.  <a href="#ga4538ed130db3bf7fc68b76a4d9e032fa"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf61b6c1c47f5c96b169ff81c345d7849"></a><!-- doxytag: member="ble_sdk_app_proximity_main::conn_params_init" ref="gaf61b6c1c47f5c96b169ff81c345d7849" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaf61b6c1c47f5c96b169ff81c345d7849">conn_params_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize the Connection Parameters module. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga4a4936c4f229d7988be372cd588561b0">alert_signal</a> (uint8_t alert_level)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Signals alert event from Immediate Alert or Link Loss services.  <a href="#ga4a4936c4f229d7988be372cd588561b0"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gad083cb3569230d7ecbf2d01ef2a2c1d9">on_ble_evt</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application's BLE Stack event handler.  <a href="#gad083cb3569230d7ecbf2d01ef2a2c1d9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga2b08d6ccb6e7f4588d2ac843d4494c0e">ble_evt_dispatch</a> (<a class="el" href="structble__evt__t.html">ble_evt_t</a> *p_ble_evt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Dispatches a BLE stack event to all modules with a BLE stack event handler.  <a href="#ga2b08d6ccb6e7f4588d2ac843d4494c0e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaa06a7a39e83ec4cf3553f4ed6ba6323a">ble_stack_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">BLE stack initialization.  <a href="#gaa06a7a39e83ec4cf3553f4ed6ba6323a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8bc84b266765b8c76cd93a328824c07d"></a><!-- doxytag: member="ble_sdk_app_proximity_main::bond_manager_init" ref="ga8bc84b266765b8c76cd93a328824c07d" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga8bc84b266765b8c76cd93a328824c07d">bond_manager_init</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Bond Manager initialization. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga3adda2642702fdb99b08992c39494000"></a><!-- doxytag: member="ble_sdk_app_proximity_main::power_manage" ref="ga3adda2642702fdb99b08992c39494000" args="(void)" -->
static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga3adda2642702fdb99b08992c39494000">power_manage</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Power manager. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga840291bc02cba5474a4cb46a9b9566fe"></a><!-- doxytag: member="ble_sdk_app_proximity_main::main" ref="ga840291bc02cba5474a4cb46a9b9566fe" args="(void)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga840291bc02cba5474a4cb46a9b9566fe">main</a> (void)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Application main function. <br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__tps__t.html">ble_tps_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gafd5babfaabd7e4c921c4cc813fb3f31f">s_tps</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__ias.html#ga8a63bc7ea5b311d297838a4095271665">ble_ias_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga7ae2ab02279a8b58ff472c6d050bbe60">s_ias</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__lls.html#gae3a4320ff2f496c898601a41a9832a07">ble_lls_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab81d1349f60eface9bdcf27d9ece74a5">s_lls</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="group__ble__sdk__srv__bas.html#gaea81f98230816bcfcbfd6ccbb4db3999">ble_bas_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gab22f840926bbada5a0ba32f2f7dc94b3">s_bas</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__gap__sec__params__t.html">ble_gap_sec_params_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga738ed84e141ba1059dd1318dc425343c">s_sec_params</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#ga76b78faf2670ecd8a7deea500be9d971">s_is_advertising</a> = false</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__sensorsim__cfg__t.html">ble_sensorsim_cfg_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaa752585d9b405d6e0c6fd392d7f64b59">s_battery_sim_cfg</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="el" href="structble__sensorsim__state__t.html">ble_sensorsim_state_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__ble__sdk__app__proximity__main.html#gaa51f5fc284e1b7e1570ab742fa9b63f3">s_battery_sim_state</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<p>Proximity Sample Application main file. </p>
<p>This file contains is the source code for a sample proximity application using the Immediate Alert, Link Loss and Tx Power services.</p>
<p>This application would accept pairing requests from any peer device. This implementation will not know whether a connected master is a known device or not.</p>
<p>It demonstrates the use of fast and slow advertising intervals. </p>
<hr/><h2>Define Documentation</h2>
<a class="anchor" id="gabab92753edef69fc4821618765ae1541"></a><!-- doxytag: member="main.c::ALERT_LEVEL_MILD_LED_PIN_NO" ref="gabab92753edef69fc4821618765ae1541" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ALERT_LEVEL_MILD_LED_PIN_NO&#160;&#160;&#160;NRF6310_LED_2</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Is on when we are in Mild Alert state. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00053">53</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga40c245aa7d948f577a38078b5fc7fa84"></a><!-- doxytag: member="main.c::ALERT_LEVEL_HIGH_LED_PIN_NO" ref="ga40c245aa7d948f577a38078b5fc7fa84" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ALERT_LEVEL_HIGH_LED_PIN_NO&#160;&#160;&#160;NRF6310_LED_3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Is on when we are in High Alert state. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00054">54</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga70b0e83bb09a339ead4165071e8121ae"></a><!-- doxytag: member="main.c::ADV_INTERVAL_SLOW_LED_PIN_NO" ref="ga70b0e83bb09a339ead4165071e8121ae" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADV_INTERVAL_SLOW_LED_PIN_NO&#160;&#160;&#160;NRF6310_LED_4</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Is on when we are doing slow advertising. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00055">55</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5f5a2c9450ebc584b4fe743c6b1a280b"></a><!-- doxytag: member="main.c::DEVICE_NAME" ref="ga5f5a2c9450ebc584b4fe743c6b1a280b" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define DEVICE_NAME&#160;&#160;&#160;&quot;PRX_APPV0.1&quot;</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Name of device. Will be included in the advertising data. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00057">57</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5af0eca94bfe9c08e0f0afe7d1e135c3"></a><!-- doxytag: member="main.c::APP_ADV_INTERVAL_FAST" ref="ga5af0eca94bfe9c08e0f0afe7d1e135c3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APP_ADV_INTERVAL_FAST&#160;&#160;&#160;0x0028</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Fast advertising interval (in units of 0.625 ms. This value corresponds to 25 ms.). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00058">58</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab8e8444f5d93426322d8cc2778d5fcf0"></a><!-- doxytag: member="main.c::APP_ADV_INTERVAL_SLOW" ref="gab8e8444f5d93426322d8cc2778d5fcf0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APP_ADV_INTERVAL_SLOW&#160;&#160;&#160;0x0C80</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Slow advertising interval (in units of 0.625 ms. This value corrsponds to 2 seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00059">59</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf58371bad8e1be8e2323df60379ed2df"></a><!-- doxytag: member="main.c::APP_ADV_TIMEOUT_IN_SECONDS" ref="gaf58371bad8e1be8e2323df60379ed2df" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define APP_ADV_TIMEOUT_IN_SECONDS&#160;&#160;&#160;180</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The advertising timeout in units of seconds. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00060">60</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab4de9cc4edfce504a560aa7bcb2c7cd3"></a><!-- doxytag: member="main.c::ADV_INTERVAL_FAST_PERIOD" ref="gab4de9cc4edfce504a560aa7bcb2c7cd3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define ADV_INTERVAL_FAST_PERIOD&#160;&#160;&#160;30000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The duration of the fast advertising period (in milli seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00061">61</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf28f0232a3fdc0eb03b94eb34b25cde8"></a><!-- doxytag: member="main.c::BATTERY_LEVEL_MEAS_INTERVAL" ref="gaf28f0232a3fdc0eb03b94eb34b25cde8" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BATTERY_LEVEL_MEAS_INTERVAL&#160;&#160;&#160;2000</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Battery level measurement interval (milliseconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00063">63</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga59eb06cba38be11278ebd2829e95bc26"></a><!-- doxytag: member="main.c::MIN_BATTERY_LEVEL" ref="ga59eb06cba38be11278ebd2829e95bc26" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIN_BATTERY_LEVEL&#160;&#160;&#160;81</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum simulated battery level. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00064">64</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga16896fb7a69ca90a4a4e341d5a888002"></a><!-- doxytag: member="main.c::MAX_BATTERY_LEVEL" ref="ga16896fb7a69ca90a4a4e341d5a888002" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_BATTERY_LEVEL&#160;&#160;&#160;100</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum simulated battery level. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00065">65</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga69eef02165834e4dabc5757b82dddbf1"></a><!-- doxytag: member="main.c::BATTERY_LEVEL_INCREMENT" ref="ga69eef02165834e4dabc5757b82dddbf1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BATTERY_LEVEL_INCREMENT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Increment between each simulated battery level measurement. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00066">66</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga95196d5d0f40cf195a6001955d6d98cf"></a><!-- doxytag: member="main.c::MIN_CONN_INTERVAL" ref="ga95196d5d0f40cf195a6001955d6d98cf" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MIN_CONN_INTERVAL&#160;&#160;&#160;((1 * 800) / 2)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum connection interval (0.5 seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00068">68</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7d868ed8adb7d475b463fd8855907a18"></a><!-- doxytag: member="main.c::MAX_CONN_INTERVAL" ref="ga7d868ed8adb7d475b463fd8855907a18" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_CONN_INTERVAL&#160;&#160;&#160;(1 * 800)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum connection interval (1 second). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00069">69</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga0c921a874ac37870fc1516ce66cd228a"></a><!-- doxytag: member="main.c::SLAVE_LATENCY" ref="ga0c921a874ac37870fc1516ce66cd228a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SLAVE_LATENCY&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Slave latency. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00070">70</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga799412c2b531ca347e13611e6e7523b9"></a><!-- doxytag: member="main.c::CONN_SUP_TIMEOUT" ref="ga799412c2b531ca347e13611e6e7523b9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CONN_SUP_TIMEOUT&#160;&#160;&#160;(4 * 100)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Connection supervisory timeout (4 seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00071">71</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7204f7a367e8f1ac53ef62c4ad220efc"></a><!-- doxytag: member="main.c::FIRST_CONN_PARAMS_UPDATE_DELAY" ref="ga7204f7a367e8f1ac53ef62c4ad220efc" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define FIRST_CONN_PARAMS_UPDATE_DELAY&#160;&#160;&#160;(20 * 1000)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Time from initiating event (connect or start of notification) to first time ble_gap_conn_param_update is called (15 seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00072">72</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gadf85796ef07632ed27e0bce9509d9245"></a><!-- doxytag: member="main.c::NEXT_CONN_PARAMS_UPDATE_DELAY" ref="gadf85796ef07632ed27e0bce9509d9245" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define NEXT_CONN_PARAMS_UPDATE_DELAY&#160;&#160;&#160;(5 * 1000)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Time between each call to ble_gap_conn_param_update after the first (5 seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00073">73</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga34db81384bfbef23dedbef9bc6dfe46c"></a><!-- doxytag: member="main.c::MAX_CONN_PARAMS_UPDATE_COUNT" ref="ga34db81384bfbef23dedbef9bc6dfe46c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_CONN_PARAMS_UPDATE_COUNT&#160;&#160;&#160;3</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Number of attempts before giving up the connection parameter negotiation. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00074">74</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7c1fffb0f865552108560d4c63b32db1"></a><!-- doxytag: member="main.c::SEC_PARAM_TIMEOUT" ref="ga7c1fffb0f865552108560d4c63b32db1" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_TIMEOUT&#160;&#160;&#160;60</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Timeout for Pairing Request or Security Request (in seconds). </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00076">76</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gacbf03a82593c273743a5a80a1119b851"></a><!-- doxytag: member="main.c::SEC_PARAM_BOND" ref="gacbf03a82593c273743a5a80a1119b851" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_BOND&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Perform bonding. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00077">77</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab6831ebe113f8afe970326b7742b5947"></a><!-- doxytag: member="main.c::SEC_PARAM_MITM" ref="gab6831ebe113f8afe970326b7742b5947" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MITM&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Man In The Middle protection not required. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00078">78</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga42df85b3a4083cdc614d9111d580d98f"></a><!-- doxytag: member="main.c::SEC_PARAM_IO_CAPABILITIES" ref="ga42df85b3a4083cdc614d9111d580d98f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_IO_CAPABILITIES&#160;&#160;&#160;BLE_GAP_IO_CAPS_NONE</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>No I/O capabilities. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00079">79</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaee13a0d0077f423fa0edd74e17fb6b88"></a><!-- doxytag: member="main.c::SEC_PARAM_OOB" ref="gaee13a0d0077f423fa0edd74e17fb6b88" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_OOB&#160;&#160;&#160;0</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Out Of Band data not available. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00080">80</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga6b7b2e2f67fbf790f55b46f8f5e24ad5"></a><!-- doxytag: member="main.c::SEC_PARAM_MIN_KEY_SIZE" ref="ga6b7b2e2f67fbf790f55b46f8f5e24ad5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MIN_KEY_SIZE&#160;&#160;&#160;7</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Minimum encryption key size. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00081">81</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf2cd1595de153ea1d6d843619a1a7707"></a><!-- doxytag: member="main.c::SEC_PARAM_MAX_KEY_SIZE" ref="gaf2cd1595de153ea1d6d843619a1a7707" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SEC_PARAM_MAX_KEY_SIZE&#160;&#160;&#160;16</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Maximum encryption key size. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00082">82</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga6c90d462c21d0b30c272f5cba8963836"></a><!-- doxytag: member="main.c::INITIAL_LLS_ALERT_LEVEL" ref="ga6c90d462c21d0b30c272f5cba8963836" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define INITIAL_LLS_ALERT_LEVEL&#160;&#160;&#160;BLE_CHAR_ALERT_LEVEL_NO_ALERT</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Initial value for the Alert Level characteristic in the Link Loss service. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00084">84</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga5273cd1f329a5864a9c2bd28f65e9d54"></a><!-- doxytag: member="main.c::TX_POWER_LEVEL" ref="ga5273cd1f329a5864a9c2bd28f65e9d54" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define TX_POWER_LEVEL&#160;&#160;&#160;(-8)</td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>TX Power Level value. This will be set both in the TX Power service, in the advertising data, and also used to set the radio transmit power. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00085">85</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="ga943e77d327737757ea2bdf929e75349d"></a><!-- doxytag: member="main.c::on_ias_evt" ref="ga943e77d327737757ea2bdf929e75349d" args="(ble_ias_t *p_ias, ble_ias_evt_t *p_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void on_ias_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__ias.html#ga8a63bc7ea5b311d297838a4095271665">ble_ias_t</a> *&#160;</td>
          <td class="paramname"><em>p_ias</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__ias__evt__t.html">ble_ias_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_evt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Immediate Alert event handler. </p>
<p>This function will be called for all Immediate Alert events which are passed to the application.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ias</td><td>Immediate Alert stucture. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_evt</td><td>Event received from the Immediate Alert service. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00611">611</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga038703ec77748ff3b1b0c88f21579c5c"></a><!-- doxytag: member="main.c::on_lls_evt" ref="ga038703ec77748ff3b1b0c88f21579c5c" args="(ble_lls_t *p_lls, ble_lls_evt_t *p_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void on_lls_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__ble__sdk__srv__lls.html#gae3a4320ff2f496c898601a41a9832a07">ble_lls_t</a> *&#160;</td>
          <td class="paramname"><em>p_lls</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structble__lls__evt__t.html">ble_lls_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_evt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Link Loss event handler. </p>
<p>This function will be called for all Link Loss events which are passed to the application.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_lls</td><td>Link Loss stucture. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">p_evt</td><td>Event received from the Link Loss service. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00633">633</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gadec561788a76b8a63ad9663625a25d78"></a><!-- doxytag: member="main.c::assert_nrf_callback" ref="gadec561788a76b8a63ad9663625a25d78" args="(uint16_t line_num, const uint8_t *file_name)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void assert_nrf_callback </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>line_num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>file_name</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Assert macro callback function. </p>
<p>This function will be called if the ASSERT macro fails.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">line_num</td><td>Line number of the failing ASSERT call. </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">file_name</td><td>File name of the failing ASSERT call. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00110">110</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga54ab546c90d69e5fc9cfee653024ea53"></a><!-- doxytag: member="main.c::service_error_handler" ref="ga54ab546c90d69e5fc9cfee653024ea53" args="(uint32_t nrf_error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void service_error_handler </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>nrf_error</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Service error handler. </p>
<p>A pointer to this function will be passed to each service which may need to inform the application about an error.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nrf_error</td><td>Error code containing information about what went wrong. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00137">137</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaf58c137ee11618425f8f0fa165834428"></a><!-- doxytag: member="main.c::adv_interval_change_timeout_handler" ref="gaf58c137ee11618425f8f0fa165834428" args="(app_timer_id_t timer_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void adv_interval_change_timeout_handler </td>
          <td>(</td>
          <td class="paramtype">app_timer_id_t&#160;</td>
          <td class="paramname"><em>timer_id</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Advertising Interval Change timer timeout handler. </p>
<p>This function will be called each time the Advertising Interval Change timer expires.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer_id</td><td>Id of timer that has expired. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00149">149</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7e5b3d2cf024dde83b8c536b22a1c155"></a><!-- doxytag: member="main.c::battery_level_meas_timeout_handler" ref="ga7e5b3d2cf024dde83b8c536b22a1c155" args="(app_timer_id_t timer_id)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void battery_level_meas_timeout_handler </td>
          <td>(</td>
          <td class="paramtype">app_timer_id_t&#160;</td>
          <td class="paramname"><em>timer_id</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Battery measurement timer timeout handler. </p>
<p>This function will be called each time the battery level measurement timer expires.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">timer_id</td><td>Id of timer that has expired. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00239">239</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga0892e076b365fc49b55bd0f90ab09222"></a><!-- doxytag: member="main.c::leds_init" ref="ga0892e076b365fc49b55bd0f90ab09222" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void leds_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>LEDs initialization. </p>
<p>Initializes all LEDs used by this application. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00250">250</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga8014b2b4745214caa69c5fddd0401388"></a><!-- doxytag: member="main.c::gpio_pin_read" ref="ga8014b2b4745214caa69c5fddd0401388" args="(uint32_t pin_number)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static __INLINE uint32_t gpio_pin_read </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>pin_number</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Read the state of the input pin. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">pin_number</td><td>Number of the pin to be read.</td></tr>
  </table>
  </dd>
</dl>
<p>Although the function nrf_gpio_pin_read does exactly what this function does, this function is defined and used by this application because this app needs to read the button states even when the soft device is not enabled. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00290">290</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga09658aaa0774820d8f25249d551bc283"></a><!-- doxytag: member="main.c::timers_init" ref="ga09658aaa0774820d8f25249d551bc283" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void timers_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Timer initialization. </p>
<p>Initializes the timer module. This creates and starts application timers. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00300">300</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga1004973353f351806e42896c491a5ab2"></a><!-- doxytag: member="main.c::gap_params_init" ref="ga1004973353f351806e42896c491a5ab2" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void gap_params_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>GAP initialization. </p>
<p>This function shall be used to setup all the necessary GAP (Generic Access Profile) parameters of the device. It also sets the permissions and appearance. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00329">329</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga935c9624de0709fe228dbefa4b54de48"></a><!-- doxytag: member="main.c::advertising_init" ref="ga935c9624de0709fe228dbefa4b54de48" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void advertising_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Advertising functionality initialization. </p>
<p>Encodes the required advertising data and passes it to the stack. Also builds a structure to be passed to the stack when starting advertising. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00375">375</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga4538ed130db3bf7fc68b76a4d9e032fa"></a><!-- doxytag: member="main.c::conn_params_error_handler" ref="ga4538ed130db3bf7fc68b76a4d9e032fa" args="(uint32_t nrf_error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void conn_params_error_handler </td>
          <td>(</td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>nrf_error</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Connection Parameters module error handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nrf_error</td><td>Error code containing information about what went wrong. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00542">542</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga4a4936c4f229d7988be372cd588561b0"></a><!-- doxytag: member="main.c::alert_signal" ref="ga4a4936c4f229d7988be372cd588561b0" args="(uint8_t alert_level)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void alert_signal </td>
          <td>(</td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>alert_level</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Signals alert event from Immediate Alert or Link Loss services. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">alert_level</td><td>Requested alert level. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00578">578</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gad083cb3569230d7ecbf2d01ef2a2c1d9"></a><!-- doxytag: member="main.c::on_ble_evt" ref="gad083cb3569230d7ecbf2d01ef2a2c1d9" args="(ble_evt_t *p_ble_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void on_ble_evt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__evt__t.html">ble_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Application's BLE Stack event handler. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Bluetooth stack event. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00651">651</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga2b08d6ccb6e7f4588d2ac843d4494c0e"></a><!-- doxytag: member="main.c::ble_evt_dispatch" ref="ga2b08d6ccb6e7f4588d2ac843d4494c0e" args="(ble_evt_t *p_ble_evt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ble_evt_dispatch </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structble__evt__t.html">ble_evt_t</a> *&#160;</td>
          <td class="paramname"><em>p_ble_evt</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Dispatches a BLE stack event to all modules with a BLE stack event handler. </p>
<p>This function is called from the BLE Stack event interrupt handler after a BLE stack event has been received.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">p_ble_evt</td><td>Bluetooth stack event. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00715">715</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa06a7a39e83ec4cf3553f4ed6ba6323a"></a><!-- doxytag: member="main.c::ble_stack_init" ref="gaa06a7a39e83ec4cf3553f4ed6ba6323a" args="(void)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static void ble_stack_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>BLE stack initialization. </p>
<p>Initializes the SoftDevice and the BLE event interrupt. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00737">737</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="gafd5babfaabd7e4c921c4cc813fb3f31f"></a><!-- doxytag: member="main.c::s_tps" ref="gafd5babfaabd7e4c921c4cc813fb3f31f" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__tps__t.html">ble_tps_t</a> <a class="el" href="group__ble__sdk__app__proximity__main.html#gafd5babfaabd7e4c921c4cc813fb3f31f">s_tps</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the TX Power service. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00087">87</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga7ae2ab02279a8b58ff472c6d050bbe60"></a><!-- doxytag: member="main.c::s_ias" ref="ga7ae2ab02279a8b58ff472c6d050bbe60" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ble__sdk__srv__ias.html#ga8a63bc7ea5b311d297838a4095271665">ble_ias_t</a> <a class="el" href="group__ble__sdk__app__proximity__main.html#ga7ae2ab02279a8b58ff472c6d050bbe60">s_ias</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the Immediate Alert service. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00088">88</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab81d1349f60eface9bdcf27d9ece74a5"></a><!-- doxytag: member="main.c::s_lls" ref="gab81d1349f60eface9bdcf27d9ece74a5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ble__sdk__srv__lls.html#gae3a4320ff2f496c898601a41a9832a07">ble_lls_t</a> <a class="el" href="group__ble__sdk__app__proximity__main.html#gab81d1349f60eface9bdcf27d9ece74a5">s_lls</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the Link Loss service. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00089">89</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gab22f840926bbada5a0ba32f2f7dc94b3"></a><!-- doxytag: member="main.c::s_bas" ref="gab22f840926bbada5a0ba32f2f7dc94b3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__ble__sdk__srv__bas.html#gaea81f98230816bcfcbfd6ccbb4db3999">ble_bas_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#gab22f840926bbada5a0ba32f2f7dc94b3">s_bas</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Structure used to identify the battery service. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00090">90</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga738ed84e141ba1059dd1318dc425343c"></a><!-- doxytag: member="main.c::s_sec_params" ref="ga738ed84e141ba1059dd1318dc425343c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__gap__sec__params__t.html">ble_gap_sec_params_t</a> <a class="el" href="group__ble__sdk__app__hrs__eval__main.html#ga738ed84e141ba1059dd1318dc425343c">s_sec_params</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Security requirements for this application. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00091">91</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="ga76b78faf2670ecd8a7deea500be9d971"></a><!-- doxytag: member="main.c::s_is_advertising" ref="ga76b78faf2670ecd8a7deea500be9d971" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool <a class="el" href="group__ble__sdk__app__proximity__main.html#ga76b78faf2670ecd8a7deea500be9d971">s_is_advertising</a> = false<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Variable to keep track of when we are advertising. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00092">92</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa752585d9b405d6e0c6fd392d7f64b59"></a><!-- doxytag: member="main.c::s_battery_sim_cfg" ref="gaa752585d9b405d6e0c6fd392d7f64b59" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__sensorsim__cfg__t.html">ble_sensorsim_cfg_t</a> <a class="el" href="group__ble__sdk__app__proximity__main.html#gaa752585d9b405d6e0c6fd392d7f64b59">s_battery_sim_cfg</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Battery Level sensor simulator configuration. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00094">94</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
<a class="anchor" id="gaa51f5fc284e1b7e1570ab742fa9b63f3"></a><!-- doxytag: member="main.c::s_battery_sim_state" ref="gaa51f5fc284e1b7e1570ab742fa9b63f3" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="structble__sensorsim__state__t.html">ble_sensorsim_state_t</a> <a class="el" href="group__ble__sdk__app__proximity__main.html#gaa51f5fc284e1b7e1570ab742fa9b63f3">s_battery_sim_state</a><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Battery Level sensor simulator state. </p>

<p>Definition at line <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html#l00095">95</a> of file <a class="el" href="nrf6310__nrf2752_2ble_2ble__app__proximity_2main_8c_source.html">main.c</a>.</p>

</div>
</div>
</div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">
      Copyright &copy 2006-2011 <a href="http://www.nordicsemi.no" style="text-decoration:none">Nordic Semiconductor</a>.
      All Rights Reserved.
      <a href="disclaimer.html">Disclaimer</a>
    </li>
   </ul>
 </div>


</body>
</html>
